#ifndef _CONFIGURATION_H_
#define _CONFIGURATION_H_
#include <cstdint>
#include <set>
#include <string>
#include <vector>

//  redis 集群配置信息
class Configuration {
  public:
    virtual ~Configuration();

    typedef struct ClusterConf {
        const int         ID;
        const std::string Host;
        const uint16_t    Port;
        const std::string Password;
        ClusterConf(const int id, const std::string host, const int port,
                    const std::string password)
            : ID(id), Host(host), Port(port), Password(password) {
        }
    } ClusterConf;

    typedef struct DataTransferConf {
        const std::string HashKeyPrefix;          // hash key prefix
        const std::string StreamKey;              // stream key
        const int         DataSyncUpdateInterval; // 数据同步每帧间隔 ms
        const int         HashGroupCount;         // 数据分组
        const int         WaitOverTime;           // 等待超时 sec
        const int         DataExpireTime;         // 数据有效时间 sec

        DataTransferConf(const std::string prefix, const std::string key,
                         const uint64_t dataSyncUpdateInterval,
                         const uint8_t  hashGroupCount,
                         const uint8_t  waitOverTime,
                         const uint8_t  dataExpireTime)
            : HashKeyPrefix(prefix), StreamKey(key),
              DataSyncUpdateInterval(dataSyncUpdateInterval),
              HashGroupCount(hashGroupCount), WaitOverTime(waitOverTime),
              DataExpireTime(dataExpireTime) {
        }

    } DataTransferConf;

  public:
  public:
    static std::vector<ClusterConf>      clusterConf;
    static std::vector<DataTransferConf> dataConf;
    static const int                     HASHSEED = 0;
};

#endif // !_CONFIGURATION_H_
